<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo ($title); ?></title>
  <meta name="description" content="这是一个 help 页面">
  <meta name="keywords" content="help">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" /> 
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" type="text/css" href="/zxtms/Public/assets/css/amazeui.min.css" />
  <link rel="stylesheet" type="text/css" href="/zxtms/Public/assets/css/admin.css" />
  <script type="text/javascript" src="/zxtms/Public/assets/js/jquery.min.js"></script>
   <script type="text/javascript" src="/zxtms/Public/assets/js/amazeui.min.js"></script>
</head>
<body>
<style>
.am-activee{
	background:#0E90D2 !important;
	color:#ffffff !important;
}
</style>
<header class="am-topbar am-topbar-inverse admin-header">
  <div class="am-topbar-brand">
   <!-- 河南志信 --> <strong>河南志信技有限公司——</strong> <small>出差管理系统</small>
  </div>
  <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
  <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
    <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">   
    <?php if(empty($_SESSION['name'])): ?><li><a href="<?php echo U('Login/login');?>"><span class="am-icon-user"></span> 登录</a></li>
    <?php else: ?>
        <li><a href=""><span class="am-icon-user"></span>  欢迎您：<?php echo (session('name')); ?></a></li> 
          <li><a href="<?php echo U('Login/logout');?>"><span class="am-icon-sign-out"></span>注销</a></li><?php endif; ?>                                    
    </ul>
  </div>
</header>

<div class="am-cf admin-main">
  <!-- sidebar start -->
  <div class="admin-sidebar am-offcanvas am-dh">
    <div class="am-offcanvas-bar admin-offcanvas-bar">    
      <ul class="am-list admin-sidebar-list" >
       <li><a <?php if(MODULE_NAME.'/'.CONTROLLER_NAME == 'Admin/Index'): ?>class="am-activee"<?php endif; ?> href="<?php echo U('Admin/Index/index');?>"><span class="am-icon-home"></span> 首页</a></li>
        <li class="admin-parent">
          <a class="am-cf" data-am-collapse="{target: '#collapse-nav2'}"> 公司管理 <span class="am-icon-angle-right am-fr am-margin-right"></span></a>
          <ul class="am-list am-collapse admin-sidebar-sub am-in" id="collapse-nav2">
           <li><a <?php if(MODULE_NAME.'/'.CONTROLLER_NAME == 'Admin/Station'): ?>class="am-activee"<?php endif; ?> href="<?php echo U('Admin/Station/View');?>" class="am-cf">公司岗位</a></li>
           <?php if(($_SESSION['uid']) == "1"): ?><li><a <?php if(MODULE_NAME.'/'.CONTROLLER_NAME == 'Admin/Staff'): ?>class="am-activee"<?php endif; ?> href="<?php echo U('Admin/Staff/View');?>" class="am-cf">员工管理</a></li><?php endif; ?>
            <li><a <?php if(MODULE_NAME.'/'.CONTROLLER_NAME == 'Admin/Status'): ?>class="am-activee"<?php endif; ?> href="<?php echo U('Admin/Status/View');?>" class="am-cf">员工状态</a></li> 
            <li><a <?php if(MODULE_NAME.'/'.CONTROLLER_NAME == 'Admin/Task'): ?>class="am-activee"<?php endif; ?> href="<?php echo U('Admin/Task/View');?>" class="am-cf">出差记录</a></li>                   
            

            <li><a <?php if(MODULE_NAME.'/'.CONTROLLER_NAME == 'Admin/Leave'): ?>class="am-activee"<?php endif; ?> href="<?php echo U('Admin/Leave/View');?>"> 请假记录</a></li>
            <li><a <?php if(MODULE_NAME.'/'.CONTROLLER_NAME == 'Admin/Late'): ?>class="am-activee"<?php endif; ?> href="<?php echo U('Admin/Late/View');?>"> 迟到记录</a></li>  
              <li><a <?php if(MODULE_NAME.'/'.CONTROLLER_NAME == 'Admin/Kqbf'): ?>class="am-activee"<?php endif; ?> href="<?php echo U('Admin/Kqbf/View');?>" class="am-cf">考勤统计</a></li>    
              <li><a <?php if(MODULE_NAME.'/'.CONTROLLER_NAME == 'Admin/Check'): ?>class="am-activee"<?php endif; ?> href="<?php echo U('Admin/Check/View');?>"> 出差累计</a></li>         
          </ul>
        </li>   
        <li class="admin-parent">
          <a class="am-cf" data-am-collapse="{target: '#collapse-nav'}"> 权限管理 <span class="am-icon-angle-right am-fr am-margin-right"></span></a>
          <ul class="am-list am-collapse admin-sidebar-sub am-in" id="collapse-nav">
            <li><a <?php if(MODULE_NAME.'/'.CONTROLLER_NAME == 'Admin/User'): ?>class="am-activee"<?php endif; ?>  href="<?php echo U('Admin/User/View');?>" class="am-cf"> 系统管理人员</a></li>
            <li><a <?php if(MODULE_NAME.'/'.CONTROLLER_NAME == 'Admin/Group'): ?>class="am-activee"<?php endif; ?> href="<?php echo U('Admin/Group/View');?>"> 角色管理</a></li>           
            <li><a <?php if(MODULE_NAME.'/'.CONTROLLER_NAME == 'Admin/Rule'): ?>class="am-activee"<?php endif; ?> href="<?php echo U('Admin/Rule/View');?>"> 权限列表</a></li>                  
          </ul>
        </li>             
      </ul>
       <div class="am-panel am-panel-default admin-sidebar-panel">
        <div class="am-panel-bd">
          <p><span class="am-icon-bookmark"></span> 公告</p>
          <p>时光静好，与君语；细水流年，与君同。—— 河南志信</p>
        </div>
      </div>

      <div class="am-panel am-panel-default admin-sidebar-panel">
        <div class="am-panel-bd">
          <p><span class="am-icon-tag"></span> wiki</p>
          <p>Welcome to the 河南志信</p>
        </div>
      </div> 
    </div>
  </div>
  <!-- sidebar end -->

  <!-- content start -->
  <div class="admin-content"> 
    <div class="admin-content-body">  
      <hr/>
      <link rel="stylesheet" type="text/css" href="/zxtms/Public/assets/css/tp.css" />
 <link rel="stylesheet" type="text/css" href="/zxtms/Public/assets/css/app.css" />
<script type="text/javascript" src="/zxtms/Public/layer/layer.js"></script><script type="text/javascript" src="/zxtms/Public/assets/js/jquery.min.js"></script> <script type="text/javascript" src="/zxtms/Public/assets/js/app.js"></script>
<style>
#hiddentip form{
	font-size:1.4rem;
}
.am-table {
	font-size: 13px;
}

.am-time {
	width: 60%;
	height: 30px;
}

</style>

<div class="tip" id="hiddentip">
	     <div class="tipexect">
	     	<div class="zan">	
	     	<form action="" method="post">	
	     	<div class="am-text-center">
	     	   <strong id="editname"></strong>
	        </div>
			    <div class="am-form-group">
			       <label for="doc-vld-name">出差天数：</label>
			      <input type="number" id="taskdate"  value="" class="am-form-field am-input-sm" required/>
			       <label for="doc-vld-name">加班天数：</label>
			      <input type="number" id="taskadd"  value="" class="am-form-field am-input-sm" required/>
			       <label for="doc-vld-name">请假天数：</label>
			      <input type="number" id="taskleave"  value="" class="am-form-field am-input-sm" required/>
			       <label for="doc-vld-name">迟到次数：</label>
			      <input type="number" id="tasklate"  value="" class="am-form-field am-input-sm" required/>
			    </div>
			  <input type="hidden" id="etid" value="">
			  <div class="am-g" style="margin-top:0rem;">
			  <div class="am-u-sm-6">
			  <a  class=" am-btn am-btn-danger am-btn-block am-btn-xs" onclick="amclose()">取消</a>
			  </div>
			  <div	class="am-u-sm-6">
			   <a class="am-btn am-btn-primary am-btn-block am-btn-xs" onclick="editsure()">确定</a>
			  </div>
			  </div>					
	      </form>	
	     	</div>
	     </div>
	</div>
<div class="am-g">
	<form class="am-form">
		<div class="am-form-group am-u-sm-3 am-u-end">
			<label for="doc-select-1">选择月份:</label> <select id="getid"
				name="getid" required onchange="selecta()">
				<option value="<?php echo ($month); ?>" selected><?php echo ($month); ?>月</option>
				<?php if(is_array($monthlist)): $i = 0; $__LIST__ = $monthlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["id"]); ?>"><?php echo ($vo["month"]); ?>月</option><?php endforeach; endif; else: echo "" ;endif; ?>
			</select> <span class="am-form-caret"></span> <input id="tex" type="hidden"
				name="tex" value="">
		</div>
	</form>
	<form class="am-form">
		<div class="am-u-sm-3 am-u-end">
			<label for="doc-select-1">收搜关键词:</label>
			<div class="am-input-group">
				<input type="text" id="search" name="search" class="am-form-field"
					placeholder="请输入姓名"
					onkeyup="this.value=this.value.replace(/[, ]/g,'')"> <span
					class="am-input-group-btn" onclick="searchb()">
					<button class="am-btn am-btn-default">
						<span class="am-icon-search"></span>
					</button>
				</span>
			</div>
		</div>
	</form>
	
	<div class="am-u-sm-3 am-u-end">
			<label for="doc-select-1">数据备份:</label><br>
		<?php if($tasklist == $null): ?><a  class="am-btn am-btn-success am-btn-block" onclick="shbfno()">导出</a>	
		<?php else: ?>
		<a  class="am-btn am-btn-success am-btn-block" onclick="shbf()">导出</a><?php endif; ?>
	
    </div>
    
    <div class="am-u-sm-3 am-u-end">
		<label for="doc-select-1">导入本月所有员工:</label><br>			
	    <a  class="am-btn am-btn-primary am-btn-block" onclick="ygdr()">导入</a>								
    </div>

<div class="am-scrollable-horizontal">
	<form action="" method="post">
		<table
			class="am-table table2excel am-table-compact am-table-centered am-scrollable-horizontal am-text-nowrap   am-table-bordered">
			<thead>
			<tr >
			<th  colspan="9">
			<?php echo ($year); ?>年<?php echo ($month); ?>月
			<input type="hidden" id="monthid" value="<?php echo ($month); ?>">
			</th>	
			<th  colspan="1">
			<a class="am-btn am-btn-danger am-btn-xs" onclick="tdelete()">批量删除</a>	
			
			<a class="am-btn am-btn-primary am-btn-xs" onclick="pltotal()">批量合计</a>			
			</th>			
		   	</tr>			
				<tr>
				
				    <th><input type="checkbox"  id="xzall" onclick="turedel()" ></th>					
					<th>姓名</th>					
					<th>应出勤天数</th>
					<th>实际出勤天数</th>
					<th>出差天数</th>
					<th>加班天数</th>
					<th>请假天数</th>
					<th>迟到次数</th>
					<th>本月工资</th>
				    <th>操作</th>					
				</tr>
			</thead>
			<tbody>
				<?php if($tasklist == $null): ?><tr >
			    <td colspan="10">
				<span style="color:red;">出差暂无记录</span>	
				<td>
			   </tr> 							
				<?php else: ?>							
				<?php if(is_array($tasklist)): $i = 0; $__LIST__ = $tasklist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vv): $mod = ($i % 2 );++$i;?><tr>	
				   <input type="checkbox" class="cq" value="<?php echo ($vv["staff_name"]); ?>"  name="username" checked style="display:none;">			
				  
				   <td><input type="checkbox"  class="wsj" value="<?php echo ($vv["id"]); ?>" name="wsj"  ></td>				  
				   <td><?php echo ($vv["staff_name"]); ?></td>					
					<td><?php echo ($t); ?></td>
					<td>
						<?php echo ($t+$vv["taskadd"]); ?></td>
					<td>
						<?php if($vv["taskdate"] == '0'): ?>暂无<?php else: echo ($vv["taskdate"]); ?>天<?php endif; ?>
						</td>
					<td>
						<?php if($vv["taskadd"] == '0'): ?>暂无<?php else: echo ($vv["taskadd"]); ?>天<?php endif; ?>
						</td>

					<td><?php echo ($vv["taskleave"]); ?>天</td>

					<td><?php echo ($vv["tasklate"]); ?>次</td>
					<td>
					<?php if($vv["tsalary"] == '0'): ?>还未计算<?php else: ?>
						<?php echo ($vv["tsalary"]); endif; ?>
					</td>
					
					<td >
					<a  class=" am-btn am-btn-danger am-btn-xs" onclick='model("<?php echo ($vv["id"]); ?>")'>编辑</a>	
					<?php if($vv["tsalary"] == '0'): ?><a class="am-btn am-btn-primary am-btn-xs" onclick='total("<?php echo ($vv["id"]); ?>")'>合计工资</a>
					<?php else: ?>
					<a class="am-btn am-btn-primary am-btn-xs am-disabled">合计工资</a><?php endif; ?>					
						
					</td>	
									
				</tr><?php endforeach; endif; else: echo "" ;endif; endif; ?>        
                 
			</tbody>
		</table>			
	</form>
	
</div>		
</div>

	

<script type="text/javascript" src="/zxtms/Public/assets/js/jquery1.min.js"></script>
<script type="text/javascript" src="/zxtms/Public/assets/js/jquery.table2excel.js"></script>


<div class="am-g am-text-center">
	 <?php echo ($page); ?>
</div>
<script>
function turedel(){	
  var checkobj = document.getElementsByName('wsj');	
  if(document.getElementById("xzall").checked==false){	 
    for(var i=0;i<checkobj.length;i++){
	  checkobj[i].checked = false;
	}  
   
  }
  else if(document.getElementById("xzall").checked==true){
    for(var i=0;i<checkobj.length;i++){
	  checkobj[i].checked = true;		 
	}
   
  } 
}

</script>



 
 </div>
    <footer class="admin-content-footer">
      <hr>
      <p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
    </footer>
  </div>
  <!-- content end -->




</div>



</body>
</html>